home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / X11 / config / os2Lib.rules < prev    next >
Text File  |  2006-04-12  |  9KB  |  211 lines

  1. XCOMM $Xorg: os2Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
  2.  
  3.  
  4.  
  5. XCOMM $XFree86: xc/config/cf/os2Lib.rules,v 3.19 2003/10/11 09:40:15 herrb Exp $
  6.  
  7. /*
  8.  * OS2/EMX shared library rules (DLL version)
  9.  *
  10. #ifndef __UNIXOS2__
  11. #error You must edit os2Lib.rules for your OS/2 dev system
  12. #endif */
  13.  
  14. #define HasSharedLibraries YES
  15. #define ForceNormalLib NO
  16. #define SharedOldX NO
  17. #define SharedDataSeparation NO
  18. #define SharedCodeDef /**/
  19. #define SharedLibraryDef /**/
  20. #define ShLibIncludeFile <os2Lib.tmpl>
  21. #define SharedLibraryLoadFlags /**/
  22. #define PositionIndependentCFlags -Zmtd
  23.  
  24. #define NormalSharedLibObjCompile(options) RemoveFile($@)                       @@\
  25.     $(CC) -c $(CFLAGS) options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.c
  26.  
  27. #define InstallSharedLibrary(libname,rev,dest)                @@\
  28. install:: libname.dll LibraryTargetName(libname) libname.lib        @@\
  29.     MakeDir($(DESTDIR)dest)                        @@\
  30.     $(INSTALL) -c $(INSTLIBFLAGS) $(DLLNAME) $(DESTDIR)dest     @@\
  31.     $(INSTALL) -c $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest         @@\
  32.     $(INSTALL) -c $(INSTLIBFLAGS) libname.a $(DESTDIR)dest        @@\
  33.     $(INSTALL) -c $(INSTLIBFLAGS) libname.lib $(DESTDIR)dest
  34.  
  35. #define LinkBuildLibrary2(slib,ext) MakeDir($(BUILDLIBDIR))        @@\
  36.     RemoveFile($(BUILDLIBDIR)/slib.ext)                @@\
  37.     (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/slib.ext .)
  38.  
  39. #define LinkBuildLibrary3(slib,rev,ext) MakeDir($(BUILDLIBDIR))    @@\
  40.     RemoveFile($(BUILDLIBDIR)/Concat3(slib,rev,ext))        @@\
  41.     (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/Concat3(slib,rev,ext) .)
  42.  
  43. #define LinkBuildLibrary4(pre,slib,rev,ext) MakeDir($(BUILDLIBDIR))    @@\
  44.     RemoveFile($(BUILDLIBDIR)/Concat4(pre,slib,rev,ext))        @@\
  45.     (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/Concat4(pre,slib,rev,ext) .)
  46.  
  47. #define LinkBuildLibrary5(slib,rev,ext) MakeDir($(BUILDLIBDIR))        @@\
  48.     RemoveFile($(BUILDLIBDIR)/$(DLLNAME))                @@\
  49.     (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/$(INSTDLLNAME) .)
  50.  
  51.         EMXIMP = emximp
  52.         EMXOMF = emxomf -p 32
  53.           SHLD = gcc -Zdll -Zmtd -Zmap -Zbin-files
  54.         SHXXLD = g++ -Zdll -Zmtd -Zmap -Zbin-files
  55.      SHADDLIBS = ExtraLibraries -lc_import
  56.        DLLNAME = `cat $(TOP)/$(CURRENT_DIR)/dll.name`
  57.    INSTDLLNAME = `cat $(BUILDINCTOP)/$(CURRENT_DIR)/dll.name`
  58.  
  59. #define BuildDllSupportLibs3(slib,rev)                    @@\
  60.     $(EMXIMP) -o Concat3(slib,rev,.imp) Concat3(slib,os2,.def)    @@\
  61.     $(EMXIMP) -o Concat4(lib,slib,rev,.a) Concat3(slib,rev,.imp)    @@\
  62.     $(EMXIMP) -o Concat3(slib,rev,_o.imp) Concat3(slib,o_os2,.def) @@\
  63.     $(EMXIMP) -o Concat3(slib,rev,.a) Concat3(slib,rev,_o.imp)    @@\
  64.     $(EMXOMF) -s -l -o Concat3(slib,rev,.lib) Concat3(slib,rev,.a)    @@\
  65.     LinkBuildLibrary4(lib,slib,rev,.a)                @@\
  66.  
  67. #define BuildLibSupportLibs(slib)                    @@\
  68.     $(EMXOMF) -s -l -o Concat(slib,.lib) Concat(slib,.a)         @@\
  69.     LinkBuildLibrary3(lib,slib,.a)                    @@\
  70.  
  71. #define BuildLibSupportLibs2(slib)                    @@\
  72.     $(EMXOMF) -s -l -o Concat(slib,.lib) Concat3(lib,slib,.a)         @@\
  73.     LinkBuildLibrary3(lib,slib,.a)                    @@\
  74.  
  75. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  76. AllTarget(Concat3(libname,rev,.dll))                    @@\
  77. .SUFFIXES: .def                                @@\
  78.                                     @@\
  79. Concat(libname,os2.def): Concat(libname,-def.cpp)            @@\
  80.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
  81.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
  82.                                     @@\
  83. Concat3(libname,rev,.dll):  solist Concat(libname,os2.def)        @@\
  84.     RemoveFile($@)                            @@\
  85.     $(SHLD) -o $(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def)    @@\
  86.     touch $@                            @@\
  87.     BuildDllSupportLibs3(libname,rev)                @@\
  88.     LinkBuildLibrary5(libname,rev,.dll)                @@\
  89.                                     @@\
  90. clean::                                    @@\
  91.     RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp))    @@\
  92.     RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def))    @@\
  93.     RemoveFile(dll.name)
  94.  
  95. #define    NormalLibraryTarget(libname,objlist)                @@\
  96. AllTarget(LibraryTargetName(libname))                    @@\
  97.                                     @@\
  98. LibraryTargetName(libname): objlist                    @@\
  99.     RemoveFile($@)                            @@\
  100.     MakeLibrary($@,objlist)                        @@\
  101.     BuildLibSupportLibs2(libname)
  102.  
  103. #define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  104. AllTarget(Concat3(libname,rev,.dll))                    @@\
  105.                                     @@\
  106. Concat(libname,os2.def): deplist $(EXTRALIBRARYDEPS) Concat(libname,-def.cpp) @@\
  107.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
  108.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
  109.                                     @@\
  110. Concat3(libname,rev,.dll):  Concat(libname,os2.def)        @@\
  111.     RemoveFile($@)                            @@\
  112.     (cd down; $(SHLD) -o up/$(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def)) @@\
  113.     touch $@                            @@\
  114.     BuildDllSupportLibs3(libname,rev)                @@\
  115.     LinkBuildLibrary5(libname,rev,.dll)                @@\
  116.                                     @@\
  117. clean::                                    @@\
  118.     RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp))    @@\
  119.     RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def))    @@\
  120.     RemoveFile(dll.name)
  121.  
  122. #define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
  123. AllTarget(Concat3(libname,rev,.dll))                    @@\
  124.                                     @@\
  125. Concat(libname,os2.def): deplist $(EXTRALIBRARYDEPS) Concat(libname,-def.cpp) @@\
  126.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
  127.     cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
  128.                                     @@\
  129. Concat3(libname,rev,.dll):  Concat(libname,os2.def)        @@\
  130.     RemoveFile($@)                            @@\
  131.     (cd down; $(SHXXLD) -o up/$(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def)) @@\
  132.     touch $@                            @@\
  133.     BuildDllSupportLibs3(libname,rev)                @@\
  134.     LinkBuildLibrary5(libname,rev,.dll)                @@\
  135.                                     @@\
  136. clean::                                    @@\
  137.     RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp))    @@\
  138.     RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def))    @@\
  139.     RemoveFile(dll.name)
  140.  
  141. #define SharedDepModuleTarget(name,deps,solist)                @@\
  142. AllTarget(name)                                @@\
  143.                                     @@\
  144. name: deps                                @@\
  145.     $(CC) -o $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
  146.                                     @@\
  147. clean::                                    @@\
  148.     RemoveFile(name)
  149.  
  150. #define SharedLibraryDataTarget(libname,rev,salist)
  151.  
  152. #define InstallSharedLibraryData(libname,rev,dest)
  153.  
  154. #define    InstallLibrary(libname,dest)                    @@\
  155. install:: LibraryTargetName(libname) Concat(libname,.lib)        @@\
  156.     MakeDir($(DESTDIR)dest)                        @@\
  157.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\
  158.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(libname,.lib) $(DESTDIR)dest @@\
  159.     RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname))
  160.  
  161. #define MakeStaticLibrary(libname) $(AR) libname *.o
  162.  
  163. #define    UnsharedLibraryTarget(libname,objlist,down,up)            @@\
  164. AllTarget(LibraryTargetNameSuffix(libname,_s))                @@\
  165.                                     @@\
  166. LibraryTargetNameSuffix(libname,_s): objlist                @@\
  167.     RemoveFile($@)                            @@\
  168.     (cd down; MakeStaticLibrary(up/$@))                @@\
  169.     RanLibrary($@)                            @@\
  170.     _LinkBuildLibrary($@)                        @@\
  171.                                     @@\
  172. install::    LibraryTargetNameSuffix(libname,_s)            @@\
  173.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR)
  174.  
  175. #define    UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\
  176. AllTarget(LibraryTargetNameSuffix(libname,_s))                @@\
  177.                                     @@\
  178. LibraryTargetNameSuffix(libname,_s): objlist1 objlist2 objlist3        @@\
  179.     RemoveFile($@)                            @@\
  180.     (cd down; MakeStaticLibrary(up/$@))                @@\
  181.     RanLibrary($@)                            @@\
  182.     _LinkBuildLibrary($@)                        @@\
  183.                                     @@\
  184. install::    LibraryTargetNameSuffix(libname,_s)            @@\
  185.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR)
  186.  
  187. #define    DebuggedLibraryTarget(libname,objlist)                @@\
  188. AllTarget(LibraryTargetNameSuffix(libname,_d))                @@\
  189.                                     @@\
  190. LibraryTargetNameSuffix(libname,_d): objlist $(EXTRALIBRARYDEPS)    @@\
  191.     RemoveFile($@)                            @@\
  192.     (cd debugger; MakeStaticLibrary(../$@))                @@\
  193.     RanLibrary($@)                            @@\
  194.     _LinkBuildLibrary($@)
  195.  
  196. #define    ProfiledLibraryTarget(libname,objlist)                @@\
  197. AllTarget(LibraryTargetNameSuffix(libname,_p))                @@\
  198.                                     @@\
  199. LibraryTargetNameSuffix(libname,_p): objlist $(EXTRALIBRARYDEPS)    @@\
  200.     RemoveFile($@)                            @@\
  201.     (cd profiled; MakeStaticLibrary(../$@))                @@\
  202.     RanLibrary($@)                            @@\
  203.     _LinkBuildLibrary($@)
  204.  
  205. #define    LibraryModuleTarget(module,objlist)                @@\
  206. AllTarget(LibraryTargetName(module))                    @@\
  207.                                     @@\
  208. LibraryTargetName(module): objlist                    @@\
  209.     RemoveFile($@)                            @@\
  210.     MakeLibrary($@,objlist)
  211.